
package character_6;


public abstract class Role {
//    private String name;
//    private int level;
//    private int blood;
    protected String name;
    protected int level;
    protected int blood;//只有同一包中类，继承该类的子类可以存取

    public abstract void fight();
    
    @Override
    public String toString(){
        return String.format("（%s,%d,%d）", this.name,this.level,this.blood);
    }
    
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public int getBlood() {
        return blood;
    }

    public void setBlood(int blood) {
        this.blood = blood;
    }
    
    
}
